#include "Tcpclient.hpp"
#include <memory>

void Usage(char *proc)
{
    cout << "Usage:\n\t";
    cout << proc << " ip port" << endl;
}

int main(int argc, char *argv[])
{
    if (argc != 3)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }

    string serverip(argv[1]);//服务器ip
    int serverport = stoi(argv[2]);//服务器端口号

    unique_ptr<Tcpclient> client(new Tcpclient(serverip, serverport));
    client->Init();
    client->start();

    return 0;
}